package com.cb.dao;

import com.cb.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.HashMap;
import java.util.List;

@Mapper
@Repository
public interface ConductorDao {

    //注册
    int conductorInsert(Employee employee);

    //登录-查找售票员
    Employee selectCount(String count);

    //查找售票员所在影院
    Cinema selectCinema(String yyid);

    List<OrderList> getOrder(HashMap map);

    double selectVipPrice(String yyid);

    Date selectEndTime(@Param("yyid") String yyid, @Param("username") String username);

    Date selectbegin(String yyid,String userName);

    int insertVip(String yyid,String userName,Date beginTime,Date endTime);

    int updateuservip(@Param("yyid") String yyid, @Param("username") String username, @Param("begintime") Date begintime, @Param("endtime") Date endtime);

    User selectUser(String username);

    double selectFilmPrice(String ypid);

    Date selectEndVipTime(String username);

    double selectamount(String username);

    double selectDiscount(String yyid);

    List<Integer> selectgrade();

    int insertOrderList(OrderList orderList);

    ScreeninFormation selectscreeninFormation(String id);

    int selectnumber(@Param("yyid") String yyid,@Param("id") int id);

    String selectList(int id);

    int updateList(@Param("ccid") int ccid,@Param("lits") String list);

    int insertAllOrderListRedis(AllOrderListRedis allOrderListRedis);

    int updateAllOrderListRedis(AllOrderListRedis allOrderListRedis);

    OrderList refund(String ddid);

    Date selectDdidTime(String id);

    int updateOrderList(@Param("status") String status,@Param("id") String id);

    List<ScreeninFormation> yyidSelectsi(@Param("yyid") String yyid, @Param("nowtime") Date nowtime, String ypid);

    int updateOrderLists(@Param("ccid") String ccid, @Param("status") String status, @Param("statustime") Date statustime, @Param("refundfee") double refundfee, @Param("id") String id);

}
